# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-draw
pkgver=6.0.1
pkgrel=2
pkgdesc="A lightweight drawing tool for Linux Deepin"
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/deepin-draw"
license=('GPL3')
depends=('deepin-picker' 'deepin-qt5integration' 'adobe-source-han-sans-otc-fonts')
makedepends=('cmake' 'qt5-tools')
groups=('deepin-extra')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-draw/archive/$pkgver.tar.gz")
sha512sums=('a25138614a9eba488729e9dd36d56a1c2ae3088baccfeb41ef61bc5a621da774ce6cfa29785c781b9dabb0b5d263cfde7c0caf820401c7dbf65456b8a1b0f252')

prepare() {
  cd deepin-draw-$pkgver
  sed -e '/set(CMAKE_CXX_FLAGS/d' -e '/set(CMAKE_C_FLAGS/d' -e '/SET(CMAKE_EXE_LINKER_FLAGS/d' \
      -i src/CMakeLists.txt
}

build() {
  cd deepin-draw-$pkgver

  cmake -DCMAKE_INSTALL_PREFIX=/usr .
  make
}

package() {
  cd deepin-draw-$pkgver
  make DESTDIR="$pkgdir" install
}
